#
# Makefile
# Main makefile for the project.
#

#
# Includes.
#
include Common.mk
include Cxx.mk
include LaTeX.mk


#
# Set the default goal.
#
.DEFAULT_GOAL = help


#
# Targets.
#

#
# Define the list of .PHONY targets.
#
.PHONY: all clean distclean help realclean latex-clean latex-init pdf viewpdf $(BOOST)

#
# clean target.
# Deletes project generated files.
#
clean: cxx-clean

#
# distclean target.
#
# Deletes project generated files and dependencies directories.
#
distclean: clean cxx-distclean

#
# help target.
#
# Displays a list of the available targets.
#
help:
	@echo
	@echo "Target\t\tDescription"
	@echo "------\t\t-----------"
	@echo "all\t\tBuilds both main and test project executables."
	@echo "check\t\tBuilds and runs project tests."
	@echo "clean\t\tDeletes project executables and object files."
	@echo "distclean\tSame as clean but also deletes $(INCLUDE_DIR), $(LIBRARY_DIR), and the directories"
	@echo "\t\twhere the dependencies distributions have been extracted."
	@echo "help\t\tDisplays this message (Default)."
	@echo "latex-init\tGenerates several files needed by LaTeX to generate the report."
	@echo "main\t\tBuilds the main project executable."
	@echo "pdf\t\tBuilds the project report in PDF."
	@echo "realclean\tDeletes everything but the project code."
	@echo "run\t\tBuils and run the project executable."
	@echo "test\t\tBuilds the project test executable."
	@echo "viewpdf\t\tOpens the generated project report."
	@echo

#
# realclean target.
#
# Deletes everything but the project sources.
#
realclean: distclean cxx-realclean

